<template>
    <view class="main">
        <LoadPage :show="show" />
        <Empty v-if="!dataList.length" />
        <serverCard :type="2" v-for="item in dataList" :data="item" :key="item.id" v-else />
    </view>
</template>

<script setup>
import { serverPointList } from '@/api/apiList'
import serverCard from '@/components/serverCard/serverCard.vue';
import { onLoad } from '@dcloudio/uni-app';
import { ref } from 'vue';

let show = ref(true)
let dataList = ref([])
const getList = async () => {
    const res = await serverPointList()
    if (res.code == 200) {
        dataList.value = res.data
        show.value = false
    }
}
onLoad(() => {
    getList()
})


</script>
<style lang="scss" scoped>
.main {
    padding: 30rpx;

}
</style>